import radio from '@form-create/designer/src/config/rule/radio';
import checkbox from '@form-create/designer/src/config/rule/checkbox';
import input from '@form-create/designer/src/config/rule/input';
import number from '@form-create/designer/src/config/rule/number';
import select from '@form-create/designer/src/config/rule/select';
import _switch from '@form-create/designer/src/config/rule/switch';
import slider from '@form-create/designer/src/config/rule/slider';
import time from '@form-create/designer/src/config/rule/time';
import date from '@form-create/designer/src/config/rule/date';
import rate from '@form-create/designer/src/config/rule/rate';
import color from '@form-create/designer/src/config/rule/color';
import row from '@form-create/designer/src/config/rule/row';
import divider from '@form-create/designer/src/config/rule/divider';
import cascader from '@form-create/designer/src/config/rule/cascader';
import upload from '@form-create/designer/src/config/rule/upload';
import transfer from '@form-create/designer/src/config/rule/transfer';
import tree from '@form-create/designer/src/config/rule/tree';
import alert from '@form-create/designer/src/config/rule/alert';
import span from '@form-create/designer/src/config/rule/span';
import space from '@form-create/designer/src/config/rule/space';
import button from '@form-create/designer/src/config/rule/button';
import editor from '@form-create/designer/src/config/rule/editor';
import tab from '@form-create/designer/src/config/rule/tab';
import tabPane from '@form-create/designer/src/config/rule/tabPane';
import tag from './rule/tag';

export default function createMenu() {
  return [
    {
      name: 'main',
      title: '表单组件',
      list: [
        input,
        number,
        radio,
        checkbox,
        select,
        _switch,
        time,
        date,
        slider,
        rate,
        color,
        cascader,
        upload,
        transfer,
        tree,
        editor,
        tabPane
      ]
    },
    {
      name: 'aide',
      title: '辅助组件',
      list: [
        alert, button, span, divider,tag
      ]
    },
    {
      name: 'layout',
      title: '布局组件',
      list: [
        row, tab, space
      ]
    },
    {
      name: 'my',
      title: '自定义组件',
      list: [

      ]
    },
  ];
}

const rule = [
  input,
  number,
  radio,
  checkbox,
  select,
  _switch,
  time,
  date,
  slider,
  rate,
  color,
  cascader,
  upload,
  transfer,
  tree,
  editor,
  tabPane,
  alert, button, span, divider,tag,row, tab, space
]
export { createMenu, rule }
